using System.Collections.ObjectModel;
using System.Windows;
using Seems.Model;

namespace Seems.SL.VM
{
	/// <summary>
	/// ViewModel to represent element shown on class diagram
	/// </summary>
	public class ElementShownOnDiagramVM : BasicVM
	{
		private DiagramElement Model { get; set; }
		public ObservableCollection<Attribute> Attributes { get; private set; }

		public string Name { get { return Model.Element.Name; }}

		private Point position;

		public Point Position
		{
			get { return position; }
			set
			{
				position = value;
				Model.Bounds.X = value.X;
				Model.Bounds.Y = value.Y;
				NotifyOfPropertyChange(() => Position);
			}
		}

		public ElementShownOnDiagramVM(DiagramElement model)
		{
			Model = model;
			position.X = model.Bounds.X;
			position.Y = model.Bounds.Y;
			Attributes = new ObservableCollection<Attribute>(model.Element.Attributes);
		}

		public void ReceiveSelection()
		{
		}
	}
}